import { Header } from 'element-ui'
import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/home/Index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    components: {
      footer: () => import(/* webpackChunkName: "home" */ '../components/footer.vue'),
      header: () => import(/* webpackChunkName: "home" */ '../components/header.vue'),
      main: () => import(/* webpackChunkName: "home" */ '../views/home/IndexTwo.vue')
    }
  },
  {
    path: '/position',
    name: 'position',
    components: {
      main: () => import(/* webpackChunkName: "Po" */ '../views/position/InPo.vue')
   
    },
    // children: [{
    //   path: 'detail/:id',
    //   name: 'detail',
    //   component: () => import(/* webpackChunkName: "Po" */ '../components/Detail.vue'),
    //   props: true,
    //   meta: { isKeep: true }
    // }]
  },
  {
    path: '/school',
    name: 'school',
    components: {
      main: () => import(/* webpackChunkName: "Sch" */ '../views/school/InSch.vue'),
      aside: () => import(/* webpackChunkName: "Sch" */ '../views/school/homePage.vue')
    }
  },
  {
    path: '/returnee',
    name: 'returnee',
    components: {
      header: () => import(/* webpackChunkName: "Rt" */ '../components/header.vue'),
      main: () => import(/* webpackChunkName: "Rt" */ '../views/returnee/InRt.vue'),
      footer: () => import(/* webpackChunkName: "Rt" */ '../components/footer.vue')
    }
  },
  {
    path: '/company',
    name: 'company',
    components: {
      main: () => import(/* webpackChunkName: "Cp" */ '../views/company/homePage.vue')
    },
    children:[
      {
        path: '/hot/:id',
        name: 'hot',
        component: ()=>import(/* webpackChunkName: "Cp" */ '../views/company/Listinfo.vue'),
      },
    ]
  },
  {
    path: '/companydetail/:id',
    name: 'companydetail',
    components:{
      main: () => import(/* webpackChunkName: "Cp" */ '../views/company/Companydetail.vue')
    },
    children:[
      {
        path: 'cyintro/:title',
        name: 'cyintro',
        component: ()=>import(/* webpackChunkName: "Cp" */ '../views/company/Cyintro.vue'),
      },
      {
        path: '/cydetail',
        name: 'cydetail',
        component: ()=>import(/* webpackChunkName: "Cp" */ '../views/company/Cydetail.vue'),
      },
      {
        path: '/cyfeel',
        name: 'cyfeel',
        component: ()=>import(/* webpackChunkName: "Cp" */ '../views/company/Cyfeel.vue'),
      },
    ]
    
  },
  {
    path: '/companyresume',
    name: 'companyresume',
    components:{
      main: () => import(/* webpackChunkName: "Cp" */ '../views/company/Companyresume.vue')
    }
    
  },
  {
    path: '/ap',
    name: 'ap',
    components: {
      main: () => import(/* webpackChunkName: "Ap" */ '../views/ap/InAp.vue'),
      aside: () => import(/* webpackChunkName: "Ap" */ '../views/ap/homePage.vue')
    }
  },
  {
    path: '/information',
    name: 'information',
    components: {
      main: () => import(/* webpackChunkName: "Im" */ '../views/information/InIm.vue'),
      aside: () => import(/* webpackChunkName: "Im" */ '../views/information/homePage.vue'),
      footer: () => import(/* webpackChunkName: "home" */ '../components/footer.vue'),
      header: () => import(/* webpackChunkName: "home" */ '../components/header.vue'),
      
    }
  },
  {
    path: '/touch',
    name: 'touch',
    components: {
      main: () => import(/* webpackChunkName: "Tc" */ '../views/touch/InTc.vue'),
      footer: () => import(/* webpackChunkName: "Tc" */ '../views/touch/footer.vue'),
      header: () => import(/* webpackChunkName: "Tc" */ '../views/touch/header.vue')
      
    }
  },
  {
    path: '/ecd',
    name: 'ecd',
    components: {
      main: () => import(/* webpackChunkName: "Ecd" */ '../views/ecd/InEcd.vue'),
      aside: () => import(/* webpackChunkName: "Ecd" */ '../views/ecd/homePage.vue')
      
    }
  },
  {
    path: '/login',
    name: 'login',
    components: {
      main: () => import(/* webpackChunkName: "login" */ '../views/login/Login.vue'),
    }
  },
  {
    path: '/register',
    name: 'Register',
    components: {
      main: () => import(/* webpackChunkName: "register" */ '../views/register/Register.vue'),
      aside: ""
      
    }
  }
]

const router = new VueRouter({
  routes
})

export default router
